# Name: Makefile
# Project: servo
# Author: Pavel Petrovic
# Creation Date: 2009-06-21
# Copyright: (c) 2009 Robotika.SK
#            based on PowerSwitch of Christian Starkjohann and
#            driver by OBJECTIVE DEVELOPMENT Software GmbH
# License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)


# Configure the following definitions according to your system. The SapienIRCtl
# tool has been successfully compiled only on Windows.

# Use the following 3 lines on Unix (uncomment the framework on Mac OS X):

# USBFLAGS = `libusb-config --cflags`
# USBLIBS = `libusb-config --libs` #-framework CoreFoundation
# EXE_SUFFIX =

# Use the following 3 lines on Windows and comment out the 3 above. You 
# have to change the include paths to where you installed libusb-win32

USBFLAGS = -I/cygdrive/c/a/libusb/libusb-win32-device-bin-0.1.12.1/include
USBLIBS = -L/cygdrive/c/a/libusb/libusb-win32-device-bin-0.1.12.1/lib/gcc -lusb
EXE_SUFFIX = .exe


CC	= gcc
CFLAGS	= $(USBFLAGS) -O -Wall
LIBS	= $(USBLIBS) -lncurses

PROGRAM = servo$(EXE_SUFFIX)


all: $(PROGRAM)

.c.o:
	$(CC) $(CFLAGS) -c $<

$(PROGRAM): servo.o
	$(CC) -o $(PROGRAM) servo.o $(LIBS)

strip: $(PROGRAM)
	strip $(PROGRAM)

clean:
	rm -f *.o $(PROGRAM)
